<%--
  Created by IntelliJ IDEA.
  User: 惟手熟尔
  Date: 2023/6/26
  Time: 9:51
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="zh-CN" class="ax-vertical-centered">
<head>
    <meta charset="UTF-8">
    <title>图书馆管理系统 --用户主页</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="static/css/bootstrap.min.css">
    <link rel="stylesheet" href="static/css/bootstrap-theme.min.css">
    <link rel="stylesheet" href="static/css/bootstrap-admin-theme.css">
    <link rel="stylesheet" href="static/css/bootstrap-admin-theme.css">
    <script src="static/js/bootstrap.min.js"></script>
    <script src="static/jQuery/jquery-3.1.1.min.js"></script>
    <script src="static/js/bootstrap-dropdown.min.js"></script>
    <script src="static/js/adminUpdateInfo.js"></script>
    <script src="static/js/adminUpdatePwd.js"></script>

</head>

<script src="static/js/jquery.min.js"></script>
<script src="static/js/bootstrap.min.js"></script>
<body>
<div class="container">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <nav class="navbar navbar-default" role="navigation">
                <div class="navbar-header">
                    <a class="navbar-brand" href="index_user.jsp"><strong>图书馆管理系统 --用户页面</strong></a>
                </div>
                <form class="navbar-form navbar-left" role="search">
                    <div class="form-group">
                        <input type="text" class="form-control" />
                    </div> <button type="submit" class="btn btn-default">Submit</button>
                </form>
                <ul class="nav navbar-nav navbar-right">
                    <li class="dropdown"><a href="#" role="button"
                                            class="dropdown-toggle" data-hover="dropdown"> <i
                            class="glyphicon glyphicon-user"></i> ${name1}(${id})
                        <i class="caret"></i></a>
                        <ul class="dropdown-menu">
                            <li><a href="login.jsp">退出</a></li>
                        </ul>
                    </li>
                </ul>
            </nav>
        </div>
    </div>
</div>

<div class="container">
    <!-- left, vertical navbar & content -->
    <div class="row">
        <!-- left, vertical navbar -->
        <div class="col-md-2 bootstrap-admin-col-left">
            <ul class="nav navbar-collapse collapse bootstrap-admin-navbar-side">
                <li><a href="MybServlet"><i
                        class="glyphicon glyphicon-chevron-right"></i> 我的借阅</a></li>
            </ul><br><br>

            <ul class="nav navbar-collapse collapse bootstrap-admin-navbar-side">
                <li><a href="update_info.jsp"><i
                        class="glyphicon glyphicon-chevron-right"></i> 修改个人信息</a></li>
            </ul>
        </div>
        <!-- content -->
        <div class="col-md-10">
            <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default bootstrap-admin-no-table-panel">
                        <div class="panel-heading">
                            <div class="text-muted bootstrap-admin-box-title">借书查询</div>
                        </div>
                        <div class="bootstrap-admin-no-table-panel-content bootstrap-admin-panel-content collapse in">
                            <form class="form-horizontal" action="MybServlet"
                                  method="get">
                                <div class="col-lg-7 form-group">
                                    <label class="col-lg-4 control-label" >输入您的姓名</label>
                                    <div class="col-lg-8">
                                        <input class="form-control" id="Name" name="name"
                                               type="text"> <label class="control-label" style="display: none;"></label>
                                    </div>
                                </div>
                                <div class="col-lg-3 form-group">
                                    <button type="submit" class="btn btn-primary" id="btn_query">我的借阅</button>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-lg-12">
                    <table id="data_list" class="table table-hover table-bordered"
                           cellspacing="0" width="100%">
                        <thead>
                        <tr>
                            <th>学号</th>
                            <th>姓名</th>
                            <th>书号</th>
                            <th>书名</th>
                            <th>作者</th>
                            <th>借书日期</th>
                        </tr>
                        </thead>
                        <tbody>
                        <c:forEach var="br" items="${list4}"	varStatus="vs">
                            <tr <c:if test="${vs.count%2==0}">class="success"</c:if> >
                                <td>${br.userNum}
                                <td>${br.username}</td>
                                <td>${br.bookId}</td>
                                <td>${br.bookName}</td>
                                <td>${br.bookAuthor}</td>
                                <td>${br.borrowData}</td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>

<form class="form-horizontal" method="post" action="AddBorrowServlet">
    <div class="modal fade" id="addModal" tabindex="-1" role="dialog"
         aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"
                            aria-hidden="true">&times;</button>
                    <h4 class="modal-title" id="myModalLabel">借书操作</h4>
                </div>
                <div class="modal-body">

                    <!---------------------表单-------------------->

                    <div class="form-group">
                        <label  class="col-sm-3 control-label">学号</label>
                        <div class="col-sm-7">
                            <input
                                    type="text" class="form-control" id="addeUserNum"
                                    name="userNum" placeholder=""> <label
                                class="control-label"  style="display: none;"></label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label  class="col-sm-3 control-label">姓名</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control" id="addusername"
                                   name="userName" placeholder=""> <label
                                class="control-label"
                                style="display: none;"></label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label  class="col-sm-3 control-label">书号</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control" id="addebookId"
                                   name="bookId" placeholder=""> <label
                                class="control-label"
                                style="display: none;"></label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">书名</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control" id="addbookName"
                                   name="bookName" placeholder=""> <label
                                class="control-label"  style="display: none;"></label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label  class="col-sm-3 control-label">作者</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control" id="addbookAuthor"
                                   name="bookAuthor" placeholder=""> <label
                                class="control-label" style="display: none;"></label>
                        </div>
                    </div>

                    <div class="form-group">
                        <label  class="col-sm-3 control-label">借书日期</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control" id="adddate"
                                   name="borrowDate" placeholder=""> <label
                                class="control-label"  style="display: none;"></label>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default"
                            data-dismiss="modal">关闭</button>
                    <button type="submit" class="btn btn-primary">添加</button>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal -->
    </div>
</form>
</body>
</html>
